.Dd Apr 15, 2010
.Dt PBI_MAKEPORT 1
.Os
.Sh NAME
.Nm pbi_makeport
.Nd Build PBI from FreeBSD Port
.Sh SYNOPSIS
.Nm
.Op Fl B
.Op Fl k
.Op Fl c Ar confdir
.Op Fl d Ar portsdir
.Op Fl o Ar outdir
.Op Fl p Ar prefix
.Op Fl -delbuild
.Op Fl -mkdebug
.Op Fl -no-prune
.Op Fl -pkgdir dir
.Op Fl -tmpfs
.Op Fl -sign Ar keyfile
.Op Ar port
.Sh DESCRIPTION
The utility,
.Nm ,
allows the building of a self-contained PBI file from a
target port in the FreeBSD ports tree. In most cases a small
meta-data module will be required for desktop compliance.
.Pp
.Sh OPTIONS
.Bl -tag -width indent
.It Fl B
Build-only, after the port make process has finished, do not 
generate the PBI file. Generally used with 
.Fl k
to build a port before running pbi_create manually. 
.It Fl c Ar confdir
Specify the meta-data confdir to use. While not required for building
a PBI, it is highly recommended. Without some configuration settings
in the meta-data, icons and binary entry-points will not be created. 
.It Fl d Ar portsdir
Specify an alternative ports-dir, defaults to /usr/ports
.It Fl k
Keep the build files after a success or failure 
compiling / building the PBI
.It Fl o Ar outdir
The directory to place the finished PBI file, defaults to users
$HOME directory
.It Fl p Ar prefix
Manually provide a PREFIX, which determines the location where the
PBI will end up being installed on the end-users system. 
.It Fl -delbuild
Remove any existing build dirs before starting this build.
.It Fl -mkdebug
When doing a port build you may run into compile / make failures. Enabling
this option will drop you to a shell prompt after a failure, keeping
the various build options set, allowing debugging and testing of 
why the port may have failed. 
.It Fl -no-prune
Disable auto-pruning of non REQUIREDBY ports after the compile phase.
By default any ports which are used solely building and not required
for program execution will be pruned. 
.It Fl -pkgdir Ar dir
Use the specified directory to cache .txz package files during the build. If
the directory contains an up to date package, it will be used instead of rebuild
the port from source.
.It Fl -tmpfs
Automatically create and mount a TMPFS file system and use it for WRKDIRPREFIX.
This can be used to speed up port compiles on systems with available RAM. 
.It Fl -sign Ar keyfile
Digitially sign the PBI file with the openssl private key file specified
.Sh NOTES
For details about the module format, please refer to the wiki guide:
http://wiki.pcbsd.org/index.php/PBI_Module_Builder_Guide
.Sh SEE ALSO
.Xr pbi_add 1 ,
.Xr pbi_create 1 ,
.Xr pbi_delete 1
